<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const dataSource = ref([
	{
		'label': '状态',
		'value': 'status',
		'list': [
			{
				'label': '待完成',
				'value': 'toConfirmed',
				'total': 0
			},
			{
				'label': '进行中',
				'value': 'inProgress',
				'total': 0
			},
			{
				'label': '已完成',
				'value': 'finished',
				'total': 0
			}
		],
		'multiple': false,
		'total': true
	},
	{
		'label': '考勤',
		'value': 'kaoqin',
		'list': [
			{
				'label': '迟到',
				'value': 'toConfirmed',
				'total': 0
			},
			{
				'label': '早退',
				'value': 'inProgress',
				'total': 0
			},
			{
				'label': '旷工',
				'value': 'finished',
				'total': 0
			},
			{
				'label': '正常',
				'value': 'finished',
				'total': 0
			}
		],
		'multiple': true,
		'total': true
	}
]);
const router = useRouter();
const goToAbout = () => {
	router.push('/about');
};
const onChange = (value) => {
	console.log(value);
};
</script>

<template>
  <h2>HomeView count:{{$store.state.count}} <el-button @click="$store.commit('increment')">count++</el-button></h2>
  <h2>HomeView aa:{{$store.state.test.aa}} <el-button @click="$store.commit('test/increment')">aa++</el-button></h2>
  <LabelSelectedVue
    :title="'asdf'"
    :dataSource="dataSource"
    @onChange="onChange"/>
  <el-button @click="goToAbout">Go to About</el-button>
</template>